# for module compiling
import os
Import('RTT_ROOT')
from building import *

objs = []
cwd  = GetCurrentDir()
list = os.listdir(cwd)

path = []
src = []
if GetDepend(['WIOTA_GATEWAY_APP']):
    path += [cwd]
    src += Glob("*.c")

group1 = DefineGroup('led_manager1', src, depend = [''], CPPPATH = path)

for d in list:
    path = os.path.join(cwd, d)
    if os.path.isfile(os.path.join(path, 'SConscript')):
        objs = objs + SConscript(os.path.join(d, 'SConscript'))

group = DefineGroup('led_manager', objs, depend = [''], CPPPATH = [])
objs += group1
Return('objs')